﻿<phone:PhoneApplicationPage
    x:Class="zhangkong.SignInPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    shell:SystemTray.ForegroundColor="Snow"
    shell:SystemTray.Opacity="0"
    toolkit:TiltEffect.IsTiltEnabled="True"
    
    >

    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="Assets/1.jpg"></ImageBrush>
        </Grid.Background>
        <!--下面是toast-->
        <Grid x:Name="SignInGrid" Width="200" Height="100" Margin="0,250,0,0">
            <TextBlock x:Name="SignInTextBlock"  TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        </Grid>
        <!--上面是toast-->
        <ProgressBar x:Name="ProgressBar" Foreground="White" Visibility="Collapsed" IsIndeterminate="True"></ProgressBar>

        <TextBlock Margin="12,17,0,28" Foreground="White" Text="掌控校园" Style="{StaticResource PhoneTextNormalStyle}"/>

        <TextBlock Foreground="White" Margin="20,45,0,0" Height="75" VerticalAlignment="Top">
            <Run Text="登录" FontSize="60" FontWeight="Light"></Run>
            <Run Text="  Sign in" FontWeight="Light" FontSize="40"></Run>
        </TextBlock>

        <Grid Margin="0,-30,0,0">
            <Grid Height="65" Width="360" VerticalAlignment="Top" Margin="0,230,0,0">
                <Border Background="White" Opacity="0.3"></Border>
                <TextBlock Height="30" Width="60" HorizontalAlignment="Left" Foreground="White" Margin="6,-120,0,0" Text="学号" TextAlignment="Left" IsHitTestVisible="False" FontSize="28" FontFamily="Arial"></TextBlock>
                <TextBox x:Name="ID" GotFocus="MakeAppBarBlack_Focus" LostFocus="MakeAppBarTransparent_Focus" Text="" MaxLength="13" FontSize="25" Height="50" InputScope="Number" Width="350" HorizontalAlignment="Right" Foreground="White" CaretBrush="White" Background="White" Style="{StaticResource SignInTextBox}" Margin="0,8,0,7"></TextBox>
            </Grid>

            <Grid Height="65" Width="360" VerticalAlignment="Top" Margin="0,350,0,0">
                <Border Background="White" Opacity="0.3"></Border>
                <TextBlock Height="30" Width="60" HorizontalAlignment="Left" Foreground="White" Margin="6,-120,0,0" Text="密码" TextAlignment="Left" IsHitTestVisible="False" FontSize="28" FontFamily="Arial"></TextBlock>
                <PasswordBox x:Name="Password" GotFocus="MakeAppBarBlack_Focus" LostFocus="MakeAppBarTransparent_Focus" FontSize="25" MaxLength="16" Height="40" Width="280" CaretBrush="White" HorizontalAlignment="Right" Style="{StaticResource MyPasswordBoxStyle}" Margin="0,13,70,12"></PasswordBox>
                <Grid Height="40" Width="80" HorizontalAlignment="Right">
                    <Button Click="RemPassword_Click" Opacity="0"/>
                    <TextBlock x:Name="RemPasswordTextBlock" IsHitTestVisible="False" Foreground="White" Text="已记住" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial"></TextBlock>
                </Grid>
            </Grid>

            <Grid Height="80" VerticalAlignment="Top" Width="360" Margin="0,420,0,0">
                <!--<CheckBox x:Name="RemPasswordCheckBox" Content="记住密码" IsChecked="True"  Height="40" VerticalContentAlignment="Top" Margin="0,-20,0,0" HorizontalAlignment="Left" Width="40" Background="#50FFFFFF" Opacity="1" Style="{StaticResource MyCheckBoxStyle}"></CheckBox>
                <TextBlock Text="记住密码" FontSize="20" Height="25" Width="80" HorizontalAlignment="Left" Opacity="0.8" VerticalAlignment="Top" Margin="40,16,0,0"></TextBlock>-->
                <HyperlinkButton IsEnabled="True" Content="注册账号" NavigateUri="/Register.xaml?IsRegister=true"  FontSize="20" Foreground="White" Opacity="0.8" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-10,56,0,0"></HyperlinkButton>
                <HyperlinkButton IsEnabled="True" Content="忘记密码" NavigateUri="/Register.xaml?IsRegister=false"  FontSize="20" Foreground="White" Opacity="0.8" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-10,16,0,0"></HyperlinkButton>
                <!--<Button Click="RegisterButton_Click" BorderThickness="0" Background="#50FFFFFF" Height="60" Width="100" Margin="258,4,0,0" Content="注册" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ButtonStyleWithNoChengeOnClick}"></Button>-->
            </Grid>


            <!--<Grid Height="100" Width="360" VerticalAlignment="Top" Margin="0,470,0,0">
                <Button Click="SignInButton_Click" Background="#50FFFFFF" Height="60" Width="100" Content="登录" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ButtonStyleWithNoChengeOnClick}"/>
                
                <Button Click="RegisterButton_Click" Background="#50FFFFFF" Height="60" Width="100" Margin="190,0,0,0" Content="注册" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ButtonStyleWithNoChengeOnClick}"></Button>

            </Grid>-->
        </Grid>
        <!--toast资源-->
        <Grid.Resources>
            <Storyboard x:Name="SignInStoryBoard">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SignInGrid"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="0:0:2">
                    <LinearDoubleKeyFrame KeyTime="0:0:0"
                                          Value="1"/>
                    <LinearDoubleKeyFrame KeyTime="0:0:1.8"
                                          Value="0.7"/>
                    <LinearDoubleKeyFrame KeyTime="0:0:2"
                                          Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Name="SignInStoryBoard1" Completed="SignInSuccess">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SignInGrid"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="0:0:2">
                    <LinearDoubleKeyFrame KeyTime="0:0:0"
                                          Value="1"/>
                    <LinearDoubleKeyFrame KeyTime="0:0:1.8"
                                          Value="0.7"/>
                    <LinearDoubleKeyFrame KeyTime="0:0:2"
                                          Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </Grid.Resources>
        <!--到此结束-->



    </Grid>

</phone:PhoneApplicationPage>